package com.example.rbacmanage.common;

import java.util.concurrent.TimeUnit;

public class Constant {
    public static final String systemLoginUserToken = "systemLoginUserToken:";
    public static final String appLoginUserToken = "appLoginUserToken:";

    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";
    /**
     * 定时任务违规的字符
     */
    public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
            "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config", "com.ruoyi.generator" };

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * RMI 远程方法调用
     */
    public static final String LOOKUP_RMI = "rmi:";

    /**
     * LDAP 远程方法调用
     */
    public static final String LOOKUP_LDAP = "ldap:";

    /**
     * LDAPS 远程方法调用
     */
    public static final String LOOKUP_LDAPS = "ldaps:";

    /**
     * 自动识别json对象白名单配置（仅允许解析的包名，范围越小越安全）
     */
    public static final String[] JSON_WHITELIST_STR = { "org.springframework", "com.ruoyi" };

    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    public static final String[] JOB_WHITELIST_STR = { "com.example.rbacmanage.task" };
    public static final String  CAPTCHA_CODE = "captcha_code:";
    /**
     * 重复对象
     */
    public static final String  REPEAT_OBJ = "repeat_obj:";
    /**
     * 几秒内不能重复
     */
    public static final Integer  EXPIRE_TIME = 3;
    /**
     * 重复设置的时间类型
     */
    public static final TimeUnit TIME_UNIT = TimeUnit.SECONDS;

    //存储websocket消息对象的前缀
    public static final String MINAPP_USER="minappuser:";
    public static final String SYSTEM_USER="systemuser:";

    public static final String PRIVATE_PATH = "privatePath";

    public static final String PUBLIC_PATH = "publicPath" ;
    public static final String ACCESS_TOKEN_EXPIRES_IN_TIME = "access_token_expires_in_time:";
    public static final String ACCESS_TOKEN = "access_token:";
}

